<tc_include file="Public:head" />
<div class="container" id="container">
    <div class="page">
        <div class="page__bd" style="height: 100%; overflow: hidden;">
            <div class="weui-tab">
                <div class="weui-tab__panel">
                    <header class="weui-bar-nav member-header">
                        <a href="{:U('Member/memberDetail')}" class="icon iconfont icon-setup full-left"></a>
                        <a href="{:U('Member/selfHelp')}" class="icon iconfont icon-code full-right"></a>
                    </header>
                    <!--您当前累计积分-->
                    <div class="member-box text-center">
                        <div>
                            <img src="__TMPL__Public/assets/images/logo.png" class="logoer"/>
                            <p>您当前累计积分</p>
                            <div class="num" data="{$member['integral']}"></div>
                        </div>
                        <div class="weui-grid__icon">
                            <img src="{$member['head_img']}" alt="">
                        </div>
                    </div>
                    <!--您当前累计积分 end-->
                    <div class="weui-tab" style="margin-top: 30px; height: auto;">
                        <!--菜单-->
                        <div class="weui-navbar" id="icon-user">
                            <div class="weui-navbar__item weui-bar__item_on">
                                <i class="icon iconfont icon-user"></i>
                            </div>
                            <div class="weui-navbar__item" id="icon-card">
                                <i class="icon iconfont icon-card"></i>
                            </div>
                            <div class="weui-navbar__item" id="icon-benefits">
                                <i class="icon iconfont icon-benefits"></i>
                            </div>
                        </div>
                        <!--菜单 end-->
                        <!--会员信息-->
                        <div class="member-user">
                            <h3>{$member['nickname']}  <span><img src="__TMPL__Public/assets/images/vip.png"></span></h3>
                            <p>
                                <b>会员</b><br />
                                注册日期：{$member['register_date']|strtotime|date="Y.m.d",###}<br />
                                累积积分：{$member['integral']}
                            </p>
                        </div>
                        <!--会员信息end-->
                    </div>
                    <!--当前会员权益-->
                    <div class="weui-panel member-list">
                        <div class="weui-panel__hd">当前会员权益</div>
                        <div class="weui-panel__bd">
                            <foreach name="member['coupon']" item="val" key="k">
                                <div class="weui-media-box weui-media-box_text">
                                    <h4 class="weui-media-box__title"><samp>{$k+1}</samp>{$val.create_time|strtotime|date="Y.m.d",###} 您获得了一张：{$val.coupon_name}</h4>
                                </div>
                            </foreach>
                        </div>
                    </div>
                    <!--<div class="weui-cells__tips text-left" style="padding: 10px 0 20px 35px;">-->
                        <!--<a href="{:U('feedback/index')}" class="linkgay" style="font-size: 16px;font-weight: 600;color: #fd6b0d;">意见反馈</a></div>-->
                    <!--当前会员权益 end-->
                </div>
                <tc_include file="Public:menu" />
            </div>
        </div>
    </div>
</div>
<tc_include file="Public:footer" />
<script>

    $('#icon-card').click(function(){
        window.location.href="{:U('Member/MyCard')}";
    });
//    $('#icon-benefits').click(function(){
//        window.location.href="{:U('Member/memberWelfare')}";
//    });

    $(function(){
        //积分格式化
        $(".num").each(function(){
            var dataNum=$(this).attr("data"),
                dataNumHtml="";
            for(i=0;i<dataNum.length;i++){
                dataNumHtml +="<span>"+dataNum[i]+"</span>"
            }
            $(this).html(dataNumHtml)
        })
    });


</script>
